import { postAxios, getAxios, postDownloadAxios } from "@/lib/http";

export const driveshaftApi = {
  // 获取发动机详情
  getById: data => {
    return getAxios(`/driveshaft/getById/${data}`);
  },
  // 添加传动轴 @author 何杺
  addDriveshaft: data => {
    return postAxios("/driveshaft/add", data);
  },
  // 分页查询传动轴 @author 何杺
  queryDriveshaft: data => {
    return postAxios("/driveshaft/page/query", data);
  },
  // 批量删除传动轴 @author 何杺
  batchDeleteDriveshaft: idList => {
    return postAxios("/driveshaft/deleteByIds", idList);
  },
  // 修改传动轴  @author 何杺
  updateDriveshaft: data => {
    return postAxios("/driveshaft/update", data);
  },
  // 导出全部  @author 何杺
  exportAll: data => {
    return postDownloadAxios("/driveshaft/export/all", data);
  },
  // 批量导出  @author 何杺
  batchExport: idList => {
    return postDownloadAxios("/driveshaft/export/batch", idList);
  }
};
